package com.zjw.nanyinge.feign;

import com.zjw.nanyinge.vo.resp.WeChatTokenRespVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "wechat-api-service", url = "${weChat.url}")
public interface WeChatApi {

    @GetMapping(value = "/cgi-bin/token")
    WeChatTokenRespVO getToken(@RequestParam("appid") String appid, @RequestParam("secret") String secret, @RequestParam("grant_type") String grant_type);

    @GetMapping("/cgi-bin/media/get")
    Object getFile(@RequestParam("access_token") String accessToken, @RequestParam("media_id") String mediaId);

}
